The present invention relates to a transmitting apparatus and to a digital video tape recorder and, more particularly, to apparatus and method for recording and reproducing MPEG2 transport packets to and from a magnetic tape.
As is known, digital video tape recorders compress a digital video signal using discrete cosine transformation (DCT) and variable length encoding prior to recording the digital video signal on a magnetic tape. NTSC video signals generally are recorded in a standard (SD) mode and high definition television (HDTV) signals generally are recorded in a high definition (HD) mode. Typical recording rates in the SD and HD modes are 25 Mbps (megabits per second) and 50 Mbps, respectively.
Currently, a format known as MPEG2 (Moving Pictures Expert Group) for video signals has been developed. In MPEG2 systems, plural programs generally are time division multiplexed prior to being transmitted, and time information, which is included in those video signals, identify the real time transmissions of each of the programs. MPEG2 transmissions are time compressed and thus transmitted in a shorter time than the real "play" time of each of the programs contained therein.
As previously stated, digital video signals are recorded in an SD mode at the rate of 25 Mbps. At this recording rate, 5 of the 25 Mbps are utilized for "trick-play" data which is stored in a trick-play area of a track and which is reproduced in a high speed reproducing mode, and 20 of the 25 Mbps are utilized for "normal" data that is reproduced in a standard speed reproducing mode. Furthermore, if one of the programs in the MPEG2 signal has a data rate of, for example, 5 Mbps and the length of that program is, for example, two hours, then the two-hour program can be transmitted in only one half of an hour (i.e., 30 minutes) if the data rate of the program is converted to 20 Mbps.
Digital video tape recorders currently can record up to 41/2 hours' worth of programs on a standard cassette in the SD mode. If each program to be recorded is time compressed in the manner described above, and assuming the data rate and length of each program is 5 Mbps and two hours, respectively, then nine two-hour programs can be recorded on a standard cassette.
An MPEG2 signal includes a plurality of programs which have been encoded and time divisionally multiplexed and which are transmitted in data units called transport packets. Timing data (DTS), which is used to extract reproduced data from a buffer, and other timing data (PTS), which is necessary for displaying the video image, are included in a header of each of the transport packets (PES). PTS/DTS data also are included with audio data.
A 27 MHz system clock is used to encode an MPEG2 video signal and the values of the PTS/DTS data are derived from the system clock. When a transmitted MPEG2 signal is decoded, the decoder's system clock is synchronized to the transmitted MPEG2 signal using time data (i.e., PCR data) that represents the value of the system clock during encoding of the video signal and which is included in each of the transport packets of the MPEG2 signal. PCR data is added to each transport packet of each program in the signal.
FIG. 1 illustrates the data structure of a transport packet in an MPEG2 signal. Each transport packet has a fixed data length of 188 bytes and includes a header, further described below, and a payload which includes the encoded video and audio data. The header of a transport packet includes data that identifies the contents of the transport packet, for example, the particular program to which the transport packet pertains.
FIG. 1A illustrates three successive transport packets, each of which includes a header and a payload. The header, as shown in FIG. 1B, includes 8 sync bytes, a 1-byte transport error indicator which indicates whether the transport packet contains errors, a payload indicator byte which identifies the beginning of the payload section, a transport priority byte which identifies the assigned priority of the transport packet, 13 bytes of packet identification data (PID) which identifies various attributes of each data stream of the transport packet, 2 bytes of transport scrambling control data which identify whether the payload data is scrambled and the type of scrambling used, 2 bytes of adaptation field control data which indicates whether an adaptation field is present, a cyclic (or continuity) counter which indicates whether the transport packet is complete or is only partially generated, and adaptation field data, which is illustrated in FIG. 1C.
As shown in FIG. 1C, the adaptation field includes 8 bytes of adaptation field length data which indicates the length of this field, a discontinuity indicator which indicates whether the system clock has been reset and whether the header contents are new, random access indicator data which indicates the random access entry point, a priority stream elementary indicator which indicates whether the payload includes an important high-priority section, an optional field flag, an optional field which is illustrated in FIG. 1D, and 1 byte of stuffing data.
The optional field is shown in FIG. 1D and includes PCR data (previously discussed), OPCR data, splice countdown data, a transport private data length, transport private data, an adaptation field extension length, and an optional field which is identified by the 3-byte flag. As is known, PCR data is a time stamp which synchronizes a system clock in an MPEG2 decoding system.
FIG. 2 is a block diagram of an exemplary MPEG2 system which time divisionally multiplexes plural television programs and which transmits and records those television programs on a magnetic tape. Three digitally-compressed programs P11, P12 and P13 are supplied to input terminals 201A, 201B, and 201C, respectively. The three programs can have different data rates, for example, program P11 can have a data rate of 5 Mbps, program P12 can have a data rate of 4 Mbps, and program P13 can have a data rate of 3 Mbps. Prior to being supplied to terminals 201A, 201B and 201C, programs P11, P12 and P13 each are divided into 188-byte transport packets which include PCR time data indicative of when each transport packet is formed. Programs P11, P12 and P13 each are supplied to PCR capture circuits 202A, 202B and 202C, respectively, which detect the respective PCR values contained therein. Programs P11, P12 and P13 then are supplied at predetermined bit rates to FIFO circuits 203A, 203B and 203C, respectively, which transmit the programs to a multiplexer 205 which time divisionally multiplexes the programs and supplies the time divisionally multiplexed signal at a data rate of 30 Mbps to a PCRI restamping circuit 209.
Multiplexer 205 further time divisionally multiplexes "stuffing" bits which have been supplied to input terminal 206 so that the data rate of the time divisionally multiplexed programs is matched to the 30 Mbps data output rate. However, upon stuffing (i.e., inserting) of "stuffing" bits to the multiplexed three programs, time data included in the transport packets are "shifted" which causes a "jitter" of the PCR data.
A captured PCR value is supplied to a PLL circuit 204 which includes a PCR recovery circuit 207 which compares the captured PCR value and a counter value which is used to synchronize the system clock, and a counter circuit 208 which generates the 27 MHz system clock. PLL circuit 204 supplies the system clock to PCRI restamping circuit 209 which replaces the PCR value contained in the multiplexed signal (from multiplexer 205) with the value supplied from circuit 204. The output of PCRI restamping circuit 209 is supplied to a channel coder/modulator circuit 210 which modulates the multiplexed signal using a transfer clock signal TCK supplied thereto and transmits the modulated signal.
The transmitted signal is received by a front-end circuit 221 of a transmission receiving circuit (which may be part of a digital video tape recorder). Front-end circuit 221 supplies the transmitted signal to a demultiplexer/descrambler circuit 222 which demultiplexes and descrambles (if necessary) one of the programs contained in the time divisionally multiplexed transmitted signal. The demultiplexed signal is supplied to a decoder 224 and to a PCR capture circuit 231 of a digital video tape recorder. Front-end circuit 221 also supplies the transmitted signal to a transfer clock recovery circuit 223 which recovers the transfer clock signal TCK therefrom. Signal TCK is supplied to demultiplexer circuit 222 and to a buffer memory 236, to be described.
The demultiplexed signal (shown as transfer stream TS) is supplied to PCR capture circuit 231 which extracts the PCR value from the header of the transport packet and supplies the PCR value to a PLL circuit 232 which compares the system clock value (of the digital video tape recorder) with the extracted PCR value in order to synchronize the 27 MHz system clock. PLL circuit 232 includes a PCR recovery circuit 233 which compares the extracted PCR value and the system clock and a counter circuit 234 which supplies a count value synchronized with the system clock to an ATS inserting circuit 235.
PCR capture circuit 231 supplies the demultiplexed signal to ATS inserting circuit 235 which inserts the output of the counter 234 into the demultiplexed signal. As is known, the inserted time data allows a reproducing device to reconstruct the burst shape upon recording. The demultiplexed signal is supplied to buffer memory 236 which at the transfer clock rate TCK supplied thereto buffers the signal for subsequent recording.
The MPEG2 video signal is reproduced from a magnetic tape in a reproducing digital video tape recorder and the reproduced signal is supplied to a buffer memory 241 and to an ATS capture circuit 242. ATS capture circuit 242 extracts the ATS data value from the reproduced signal and supplies the ATS value to a memory controller 243. Buffer memory 241 receives a control signal from memory controller 243 and a transfer clock signal TCK which control the writing and the reading of the reproduced video signal to and from buffer memory 241. A system clock generator 250 generates the 27 MHz system clock from the ATS value extracted and a rotating drum (not shown) of the digital video tape recorder is rotated in synchronization with the system clock.
Referring now to FIGS. 3A and 3B, a schematic diagram illustrating the demultiplexing of a selected program A from a time divisionally multiplexed signal containing programs A, B and C is shown. As previously indicated, the data rate of the time divisionally multiplexed signal is 30 Mbps, and the data rate of a selected program A is equal to, for example, 10 Mbps. A rate converting buffer 302, shown in FIG. 4, converts the data rate of the demultiplexed signal (which now contains only program A) supplied to an input terminal 301 by one-third from 30 Mbps to 10 Mbps. The rate converted signal is supplied at terminal 303 and subsequently recorded on a magnetic tape.
One problem encountered in the above-described system is that time data changes when the data rate of a transport packet changes. This change causes the PCR value in each time-compressed transport packet to represent incorrect time information, and thus, results in the inability to properly reproduce the recorded MPEG2 signal.
Another difficulty encountered in the above-described system is the general inability to ensure that no errors occur in the PCR value and that the PCR value is properly and accurately maintained throughout the entire transmitting, recording and reproducing system.
Furthermore, MPEG2 formatted video data includes I-frames which are intraframe-encoded, P-frames which are forward-prediction encoded, and B-frames which are bidirectionally-prediction encoded. During variable or high-speed reproduction of MPEG2 video data, P- and B-frames cannot be properly decoded since only part of each frame is reproduced. And although reproduced I-frames can be decoded without P- and B-frame data in high-speed reproducing modes, I-frames still cannot properly be encoded because their positions on the recorded tracks are unknown due to the fact that considerable header information are not reproduced in such high-speed reproducing modes.